using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace EuropeEngulfed.NET
{
    partial class StrategicWarFighterInterceptionDialog : Form
    {
        private GameController.playerType player;
        private GameController currentGame;

        public StrategicWarFighterInterceptionDialog(GameController.playerType player, GameController currentGame)
        {
            this.player = player;
            this.currentGame = currentGame;
            InitializeComponent();
            if (player == GameController.playerType.AxisPlayer)
            {
                //Bomber Display
                this.BombersPictureBox.Image = PlayingPieceGraphics.GetWesternAlliedBomberImage();
                this.numberBombersLabel.Text = currentGame.GetWesternAlliedBomberPoints().ToString();

                //Escort Display
                //TODO Show Upgraded escort image here
                this.EscortsPictureBox.Image = PlayingPieceGraphics.GetWesternAlliedFighterImage();
                this.numberEscortsLabel.Text = currentGame.GetWesternAlliedFighterPoints().ToString();

                //Interceptor Display
                this.InterceptorsPictureBox.Image = PlayingPieceGraphics.GetGermanFighterImage();
                this.numberInterceptorsLabel.Text = currentGame.GetGermanFighterPoints().ToString();

                //Flak Display
                this.FlakPictureBox.Image = PlayingPieceGraphics.GetGermanFlakImage();
                this.numberFlakLabel.Text = currentGame.GetGermanFlakLevel().ToString();

                this.numberWERPSLabel.Text = currentGame.GetCurrentGermanWERPProduction().ToString();
            }
            else
            {
                //Bomber Display
                this.BombersPictureBox.Image = PlayingPieceGraphics.GetGermanBomberImage(); ;
                this.numberBombersLabel.Text = currentGame.GetGermanBomberPoints().ToString();

                //Escort Display
                this.EscortsPictureBox.Image = PlayingPieceGraphics.GetGermanFighterImage();
                this.numberEscortsLabel.Text = currentGame.GetGermanFighterPoints().ToString();

                //Interceptor Display
                this.InterceptorsPictureBox.Image = PlayingPieceGraphics.GetWesternAlliedFighterImage();
                this.numberInterceptorsLabel.Text = currentGame.GetWesternAlliedFighterPoints().ToString();

                //Flak Display
                this.FlakPictureBox.Image = PlayingPieceGraphics.GetWesternAlliedFlakImage();
                this.numberFlakLabel.Text = currentGame.GetWesternAlliedFlakLevel().ToString();

                this.numberWERPSLabel.Text = currentGame.GetCurrentUKWERPProduction().ToString();
            }
        }

        private void InterceptButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Yes;
            this.Close();
        }

        private void DoNotIntercept_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.No;
            this.Close();
        }
    }
}